<template>
  <div class="ele-body">
    <el-card shadow="never">
      <!-- 搜索表单 -->
      <user-search :typeList="merchanApplyForStatusList"
                   @search="reload" />
      <!-- 数据表格 -->
      <ele-pro-table ref="table"
                     :columns="columns"
                     :datasource="datasource"
                     :selection.sync="selection"
                     cache-key="systemUserTable">
        <!-- 表头工具栏 -->
        <template v-slot:toolbar>
          <el-button size="small"
                     type="success"
                     icon="el-icon-plus"
                     class="ele-btn-icon"
                     v-if="currentPlatform !== '总平台'"
                     @click="openWeInbound(1)">
            微信进件
          </el-button>
          <el-button size="small"
                     type="primary"
                     icon="el-icon-plus"
                     class="ele-btn-icon"
                     v-if="currentPlatform !== '总平台'"
                     @click="openWeInbound(2)">
            支付宝进件
          </el-button>
          <!--          <el-button-->
          <!--            size="small"-->
          <!--            icon="el-icon-upload2"-->
          <!--            class="ele-btn-icon"-->
          <!--            @click="openImport"-->
          <!--          >-->
          <!--            导入-->
          <!--          </el-button>-->
        </template>

        <!-- 角色列 -->
        <template v-slot:applyForType="{ row }">
          <el-tag :type="row.applyForType == '1' ? 'success' : ''">
            {{ applyForType(row.applyForType) }}
          </el-tag>
        </template>
        <template v-slot:handlingCharge="{ row }">
          <div>{{ row.handlingCharge?row.handlingCharge:'--'}}</div>
        </template>
        <!-- 状态列 -->
        <template v-slot:merchanApplyForStatus="{ row }">
          <el-tag :type="merchanApplyForStatus(row.merchanApplyForStatus).type">
            {{ merchanApplyForStatus(row.merchanApplyForStatus).status,
            }}
          </el-tag>
        </template>
        <!-- 操作列 -->
        <template v-slot:action="{ row }">

          <el-link type="primary"
                   icon="el-icon-view"
                   :underline="false"
                   style="color: #00cc5c"
                   v-if="
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
                '审核中' ||
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
                '代账户验证' ||
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
                '已完成' ||
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
                '待签约' ||
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
                '开通权限中' ||
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
                '待账号验证' ||
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
                '已作废'
            "
                   @click="viewDetail(row.id)">
            查看详情
          </el-link>
          <el-link type="primary"
                   :underline="false"
                   icon="el-icon-edit"
                   @click="modifyRate(row.id)"
                   v-if="
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
                '已完成'
            ">
            费率设置
          </el-link>
          <el-link type="primary"
                   :underline="false"
                   icon="el-icon-link"
                   @click="copySrc(row.shopUrl)">
            小票链接
          </el-link>
          <el-link type="danger"
                   :underline="false"
                   icon="el-icon-document-delete"
                   @click="viewDetail(row.id, row.merchanApplyForStatus)"
                   v-if="
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
              '已驳回'
            ">
            驳回原因
          </el-link>
          <el-link :underline="false"
                   type="primary"
                   size="mini"
                   icon="el-icon-finished"
                   style="margin-left: 5px"
                   @click="openElDialog(row.signUrl, row.merchanApplyForStatus)"
                   v-if="
              merchanApplyForStatus(row.merchanApplyForStatus).status ==
              '待签约'
            ">待签约</el-link>
          <el-popconfirm class="ele-action"
                         title="是否确定要删除该笔进件信息"
                         @confirm="remove(row)">
            <template v-slot:reference>
              <el-link type="danger"
                       icno='el-icon-finished'
                       :underline="false"
                       icon="el-icon-delete">
                删除
              </el-link>
            </template>
          </el-popconfirm>
        </template>
      </ele-pro-table>
    </el-card>
    <!-- 修改弹窗 -->
    <user-edit :typeList="typeList"
               :id="id"
               :visible.sync="showEdit"
               :data="current"
               @done="reload" />
    <!-- 编辑/充值弹窗 -->
    <equipment-edit :visible.sync="showTransfer"
                    :data="current"
                    @done="reload" />
    <!-- 导入弹窗 -->
    <user-import :visible.sync="showImport"
                 @done="reload" />

    <el-drawer :visible.sync="drawer"
               size="70%"
               :before-close="handleClose"
               ref="drawer"
               :with-header="false">
      <div v-show="loading"
           class="loading-div"
           v-loading="loading"
           element-loading-text="努力提交中..."
           :style="{ height: windowHeight + 'px' }">
      </div>
      <!-- 主体信息 -->
      <el-row :gutter="10"
              :class="[currentStepIndex == 3 ? 'el-row-active' : 'el-row']">
        <el-col v-bind="styleResponsive ? { lg: 24, md: 12 } : { span: 24 }">
          <incomingDetails :detailsList="list"
                           v-if="jjstatus == '3' && incomingStatus != 3"></incomingDetails>

          <!-- 支付宝为2 -->
          <div class="zfb-purple"
               v-show="jjstatus == '2'">
            <h6 v-if="zfbCurrentStepIndex !== 3"
                class="zfbHLabel">支付宝个体工商进件</h6>

            <Steps v-if="zfbCurrentStepIndex !== 3"
                   :currentStep="zfbCurrentStepIndex"
                   :totalSteps="3"
                   :stepsLabel="stepsLabel"
                   :stepsDesc="stepsDesc"
                   :totalWidth="1280"
                   :descMaxWidth="160" />

            <el-form :label-position="labelPosition"
                     :rules="rules"
                     ref="zfbSumbitForm"
                     :model="zfbSumbitForm"
                     class="ruleForm">
              <div class="fromSubmitOne"
                   v-show="zfbCurrentStepIndex == 1">
                <!-- 微信下属代理 -->
                <!-- <el-form-item label="下属代理"
                              prop="subordinateAgent">
                  <el-select v-model="zfbSumbitForm.subordinateAgent"
                             placeholder="请选择"
                             @change="(event) => getAgentParentIdList(event, 'wx')">
                    <el-option v-for="(item, index) in subordinateAgentList"
                               :key="index"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item> -->

                <!-- 进件商家 -->
                <!-- <el-form-item label="进件商家"
                              prop="merchantId">
                  <el-select v-model="zfbSumbitForm.merchantId"
                             placeholder="请选择"
                             @change="(event) => getMerchantIdList(event, 'wx')">
                    <el-option v-for="item in merchantIdList"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item> -->
                <h6 class="hLabel">主体信息</h6>
                <el-form-item label="商户类型"
                              prop="merchantType">
                  <div class="subjectTypeSwitch"
                       style="width: 300px">
                    <!-- 个体 -->
                    <div :class="[
                        zfbSumbitForm.merchantType == '01'
                          ? 'individuality'
                          : 'active-individuality'
                      ]"
                         @click="switchType('01')">企业</div>
                    <!-- 企业 -->
                    <div :class="[
                        zfbSumbitForm.merchantType == '06'
                          ? 'active-enterprise'
                          : 'enterprise'
                      ]"
                         @click="switchType('06')">个人商户</div>

                    <!-- 个人商户 -->
                    <div :class="[
                        zfbSumbitForm.merchantType == '07'
                          ? 'active-enterprise'
                          : 'enterprise'
                      ]"
                         @click="switchType('07')">个体工商户</div>
                  </div>
                </el-form-item>
                <el-form-item label="商户名称"
                              prop="name">
                  <el-input v-model="zfbSumbitForm.name"
                            placeholder="请输入商户名称"></el-input>
                  <span>注意:[支付宝的账单名称,会显示此处的设置的商户简称]</span>
                </el-form-item>
                <el-form-item label="商户别名"
                              prop="aliasName">
                  <el-input v-model="zfbSumbitForm.aliasName"
                            placeholder="请输入商户别名"></el-input>
                  <span>注意:[支付宝的账单名称,会显示此处的设置的商户简称]</span>
                </el-form-item>
                <el-form-item label="进件mcc"
                              prop="mcc">
                  <el-cascader v-model="zfbSumbitForm.mcc"
                               placeholder="请填写进件mcc"
                               :options="mccOptions"
                               @change="handleChangeMcc"
                               :props="{ expandTrigger: 'hover' }"></el-cascader>
                </el-form-item>
                <el-form-item label="商户证件编号"
                              prop="certNo">
                  <el-input v-model="zfbSumbitForm.certNo"
                            :placeholder="
                      zfbSumbitForm.merchantType !== '06'
                        ? '请选择营业执照号'
                        : '请选择个人身份证号码'
                    "></el-input>
                  <span>按商户类型的说明提供对应的证件编号 如果为企业
                    个体工商户请输入营业执照号
                    个人商户的时候输入身份证号码</span>
                </el-form-item>

                <el-form-item label="营业执照名称"
                              prop="certName">
                  <el-input v-model="zfbSumbitForm.certName"
                            placeholder="请输入营业执照名称"></el-input>
                  <span>注意:[请填写营业执照的商家名称，2~110个字符,支持括号]</span>
                </el-form-item>
                <el-form-item label="营业执照省市区编号"
                              prop="licenseCode">
                  <regions-select v-model="zfbSumbitForm.licenseCode"
                                  placeholder="请营业执照省市区编号"
                                  @input="(event) => regionsInput(event, 'licenseCode')" />
                </el-form-item>

                <!-- 门头照片 -->
                <el-form-item label="门头照片"
                              prop="outDoorImages">
                  <el-upload action="#"
                             ref="pictureUploadOutDoorImages"
                             list-type="picture-card"
                             :limit="5"
                             :on-exceed="exceedFn"
                             :on-change="
                      (files, fileList) =>
                        handleFileChange(files, fileList, 'outDoorImages')
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />

                      <span class="el-upload-list__item-actions">
                        <!-- 图片的预览 -->
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>
                        <!-- 图片的下载 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>
                        <!-- 图片的移除 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'outDoorImages')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                  <el-dialog :visible.sync="dialogVisible">
                    <img width="100%"
                         :src="dialogImageUrl"
                         alt="" />
                  </el-dialog>
                  <span>注意:【门头照片必须要要与营业执照的名称相关，否则人工审核会失败】</span>
                </el-form-item>
                <!-- 办公环境 -->
                <el-form-item label="办公环境"
                              prop="inDoorImages">
                  <el-upload action="#"
                             ref="pictureUploadInDoorImages"
                             list-type="picture-card"
                             :limit="5"
                             :on-exceed="exceedFn"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(file, fileList, 'inDoorImages')
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span> {{ file.url }}</span>
                      <span class="el-upload-list__item-actions">
                        <!-- 图片的预览 -->
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>
                        <!-- 图片的下载 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>
                        <!-- 图片的移除 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'inDoorImages')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                  <el-dialog :visible.sync="dialogVisible">
                    <img width="100%"
                         :src="dialogImageUrl"
                         alt="" />
                  </el-dialog>
                  <span>注意:【办公环境如:餐饮店的照片、办公室、公司前台等照片...】</span>
                </el-form-item>
              </div>
              <div class="fromSubmitTwo"
                   v-show="zfbCurrentStepIndex == 2">
                <h6 class="hLabel">法人/负责人信息</h6>

                <el-form-item label="法人姓名"
                              prop="legalName">
                  <el-input placeholder="请输入法人姓名"
                            v-model="zfbSumbitForm.legalName"
                            @change="inputFn"></el-input>
                </el-form-item>
                <!-- <el-form-item label="证件类型"
                                prop="idDocType">
                    <el-select v-model="zfbSumbitForm.idDocType"
                               placeholder="请选择证件类型"
                               @change="verifyChangesFn">
                      <el-option v-for="item in idDocTypeOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item> -->
                <el-form-item label="法人身份证号"
                              prop="legalCertNo">
                  <el-input placeholder="请输入法人身份证号"
                            v-model="zfbSumbitForm.legalCertNo"
                            show-password></el-input>
                </el-form-item>
                <el-form-item label="联系人姓名"
                              prop="contactName">
                  <el-input placeholder="请输入联系人姓名"
                            v-model="zfbSumbitForm.contactName"></el-input>
                </el-form-item>
                <el-form-item label="联系人电话"
                              prop="contactMobile">
                  <el-input placeholder="请输入联系人电话"
                            v-model="zfbSumbitForm.contactMobile"></el-input>
                </el-form-item>

                <!-- 身份证正反面 -->
                <div class="positiveAndNegativeIDcards">
                  <!-- 身份证正面 -->
                  <el-form-item label="身份证正面"
                                prop="certImage"
                                class="positiveIDcards">
                    <el-upload action="#"
                               ref="pictureUploadIdCertImage"
                               :limit="1"
                               :on-exceed="exceedFn"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(file, fileList, 'certImage')
                      "
                               list-type="picture-card"
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <!-- 图片的预览 -->
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>
                          <!-- 图片的下载 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>
                          <!-- 图片的移除 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'certImage')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible">
                      <img width="100%"
                           :src="dialogImageUrl"
                           alt="" />
                    </el-dialog>
                  </el-form-item>

                  <!-- 身份证反面 -->
                  <el-form-item label="身份证反面"
                                prop="certImageBack">
                    <el-upload action="#"
                               list-type="picture-card"
                               :limit="1"
                               :on-exceed="exceedFn"
                               ref="pictureUploadCertImageBack"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(file, fileList, 'certImageBack')
                      "
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <!-- 图片的预览 -->
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>
                          <!-- 图片的下载 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>
                          <!-- 图片的移除 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'certImageBack')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible">
                      <img width="100%"
                           :src="dialogImageUrl"
                           alt="" />
                    </el-dialog>
                  </el-form-item>
                </div>

                <!-- 结算到支付宝 -->
                <div v-if="jjstatus == '2'">
                  <!-- 结算到支付宝 -->
                  <h6 class="hLabel">默认结算类型</h6>

                  <div class="subjectTypeSwitch">
                    <!-- 个体 -->
                    <div :class="[
                        zfbSumbitForm.defaultSettleType == 'bankCard'
                          ? 'individuality'
                          : 'active-individuality'
                      ]"
                         @click="switchSettlementType('bankCard')">银行卡</div>
                    <!-- 企业 -->
                    <div :class="[
                        zfbSumbitForm.defaultSettleType == 'alipayAccount'
                          ? 'active-enterprise'
                          : 'enterprise'
                      ]"
                         @click="switchSettlementType('alipayAccount')">支付宝</div>
                  </div>

                  <div v-if="zfbSumbitForm.defaultSettleType == 'alipayAccount'">
                    <h6 class="hLabel">结算到支付宝</h6>
                    <el-form-item label="商户使用服务"
                                  prop="serviceList">
                      <el-select v-model="zfbSumbitForm.serviceList"
                                 multiple
                                 @change="verifyChangesFn"
                                 placeholder="请选择商户使用服务">
                        <el-option v-for="item in optionsServiceList"
                                   :key="item.value"
                                   :label="item.label"
                                   :value="item.value">
                        </el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item label="结算支付宝账号"
                                  prop="alipayLogonId">
                      <el-input show-password
                                v-model="zfbSumbitForm.alipayLogonId"
                                placeholder="请输入结算支付宝账号"></el-input>
                    </el-form-item>
                    <el-form-item label="默认结算目标"
                                  prop="defaultSettleTarget">
                      <el-input v-model="zfbSumbitForm.defaultSettleTarget"
                                show-password
                                :placeholder="
                          zfbSumbitForm.defaultSettleType == 'bankCard'
                            ? '请输入银行卡号'
                            : '请输入支付宝账号登录号'
                        "></el-input>
                    </el-form-item>
                    <el-form-item label="签约支付宝账户"
                                  prop="bindingAlipayLogonId">
                      <el-input show-password
                                v-model="zfbSumbitForm.bindingAlipayLogonId"
                                placeholder="请输入签约支付宝账户"></el-input>
                    </el-form-item>
                    <!-- <el-form-item label="抽佣比例"
                                prop="activitiesRate">
                    <el-input placeholder="请输入抽佣比例"
                              v-model="zfbSumbitForm.activitiesRate">
                      <template slot="append">%</template></el-input>
                    <span>注意:【请认真分佣比例，最多不能超过30%!如不分佣，则不用填!一旦入驻成功，不支持修改分佣比例!】</span>
                  </el-form-item> -->
                  </div>
                </div>
                <!-- 结算到银行卡 -->
                <div v-if="
                    jjstatus == '2' &&
                    zfbSumbitForm.defaultSettleType == 'bankCard'
                  ">
                  <h6 class="hLabel">结算到银行卡</h6>
                  <el-form-item label="账户类型"
                                prop="usageType">
                    <el-select v-model="zfbSumbitForm.usageType"
                               placeholder="请选择账户类型"
                               @change="verifyChangesFn">
                      <el-option v-for="item in usageTypeOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="银行卡类型"
                                prop="accountType">
                    <el-select v-model="zfbSumbitForm.accountType"
                               placeholder="请选择银行卡类型"
                               @change="verifyChangesFn">
                      <el-option v-for="item in accountTypeOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>

                  <el-form-item label="默认结算目标"
                                prop="defaultSettleTarget">
                    <el-input show-password
                              v-model="zfbSumbitForm.defaultSettleTarget"
                              :placeholder="
                        zfbSumbitForm.defaultSettleType == 'bankCard'
                          ? '请输入银行卡号'
                          : '请输入支付宝账号登录号'
                      "></el-input>
                  </el-form-item>
                  <el-form-item label="开户银行"
                                prop="accountInstName">
                    <el-select v-model="zfbSumbitForm.accountInstName"
                               placeholder="请选择开户银行">
                      <el-option v-for="item in accountBankOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                      </el-option>
                    </el-select>
                    <div style="color: #b4b4b4">17家直连银行，请根据开户银行，非17家直连银行，该参数请填写为“其他银行”</div>
                  </el-form-item>
                  <el-form-item label="开户行简称缩写"
                                prop="accountInstId">
                    <el-input v-model="zfbSumbitForm.accountInstId"
                              placeholder="请输入开户行简称缩写"></el-input>
                  </el-form-item>
                  <el-form-item label="开户支行名"
                                prop="accountBranchName">
                    <el-input placeholder="请输入开户支行名"
                              v-model="zfbSumbitForm.accountBranchName"></el-input>
                  </el-form-item>

                  <el-form-item label="开户行省市"
                                prop="accountInstCode">
                    <regions-select v-model="zfbSumbitForm.accountInstCode"
                                    placeholder="请选择省市区"
                                    @input="(event) => regionsInput(event, 'accountInstCode')" />
                  </el-form-item>

                  <el-form-item label="开户名称"
                                prop="accountHolderName">
                    <el-input placeholder="请输入开户名称"
                              v-model="zfbSumbitForm.accountHolderName"></el-input>
                    <span>1、选择经营者个人银行卡时，开户名称必须与身份证姓名一致。<br />
                      2、选择对公账户时，开户名称必须与营业执照上的“商户名称”一致。</span>
                  </el-form-item>
                  <el-form-item label="银行卡号"
                                prop="accountNo">
                    <el-input placeholder="请输入银行账号"
                              v-model="zfbSumbitForm.accountNo"
                              show-password></el-input>
                  </el-form-item>
                </div>
              </div>
              <div class="drawer__footer"
                   v-if="zfbCurrentStepIndex !== 3">
                <el-button round
                           @click="$refs.drawer.closeDrawer()">取 消</el-button>
                <div class="drawerFooterRight">
                  <el-button round
                             @click="resetForm('zfbSumbitForm')"
                             type="primary">重置</el-button>
                  <el-button v-if="zfbCurrentStepIndex == 2"
                             round
                             @click="previousPage"
                             type="primary">上一页</el-button>
                  <el-button round
                             type="primary"
                             @click="submitForm('zfbSumbitForm')">{{
                      zfbCurrentStepIndex == 1 ? '下一步' : '提交'
                    }}</el-button>
                </div>
              </div>
            </el-form>

            <div class="fromSubmitThree"
                 v-if="zfbCurrentStepIndex == 3 && incomingStatus !== 3">
              <img src="../../../static/examineing.png"
                   alt="" />
              <div class="examine">资料正在审核中</div>
              <div style="color: '#666'">预计需要1-7个工作日进行审核,请耐心等待~</div>
              <el-button class="closePage"
                         @click="cancelForm"
                         round>关闭页面</el-button>
            </div>
          </div>
          <!-- 微信为1 -->
          <div class="wx-purple"
               v-show="jjstatus == '1'">
            <h6 v-if="currentStepIndex !== 3"
                class="wxHLabel">微信个体工商进件</h6>

            <Steps v-if="currentStepIndex !== 3"
                   :currentStep="currentStepIndex"
                   :totalSteps="3"
                   :stepsLabel="stepsLabel"
                   :stepsDesc="stepsDesc"
                   :totalWidth="1280"
                   :themeColor="'#28C445'"
                   :descMaxWidth="160" />

            <el-form :label-position="labelPosition"
                     label-width="100px"
                     :rules="rules"
                     ref="wxSumbitForm"
                     :model="wxSumbitForm"
                     class="ruleForm">
              <div class="fromSubmitOne"
                   v-show="currentStepIndex == 1">
                <!-- 微信下属代理 -->
                <el-form-item label="下属代理"
                              prop="subordinateAgent">
                  <el-select v-model="wxSumbitForm.subordinateAgent"
                             placeholder="请选择"
                             @change="(event) => getAgentParentIdList(event, 'wx')">
                    <el-option v-for="(item, index) in subordinateAgentList"
                               :key="index"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>

                <!-- 进件商家 -->
                <el-form-item label="进件商家"
                              prop="merchantId">
                  <el-select v-model="wxSumbitForm.merchantId"
                             placeholder="请选择"
                             @change="(event) => getMerchantIdList(event, 'wx')">
                    <el-option v-for="item in merchantIdList"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <h6 class="hLabel">主体信息</h6>
                <el-form-item label="入驻类型"
                              prop="subjectType">
                  <div class="entryTypeSwitch">
                    <!-- 个体 -->
                    <div :class="[
                        wxSumbitForm.subjectType == 'SUBJECT_TYPE_INDIVIDUAL'
                          ? 'individuality'
                          : 'active-individuality'
                      ]"
                         @click="switchType('SUBJECT_TYPE_INDIVIDUAL')">个体工商户</div>
                    <!-- 企业 -->
                    <div :class="[
                        wxSumbitForm.subjectType == 'SUBJECT_TYPE_ENTERPRISE'
                          ? 'active-enterprise'
                          : 'enterprise'
                      ]"
                         @click="switchType('SUBJECT_TYPE_ENTERPRISE')">企业</div>
                  </div>
                </el-form-item>
                <el-form-item label="商户简称"
                              prop="merchantShortname">
                  <el-input v-model="wxSumbitForm.merchantShortname"></el-input>
                  <span>注意:[支付宝的账单名称,会显示此处的设置的商户简称]</span>
                </el-form-item>
                <el-form-item label="营业执照名称"
                              prop="merchantName">
                  <el-input v-model="wxSumbitForm.merchantName"></el-input>
                  <span>注意:[请填写营业执照的商家名称，2~110个字符,支持括号]</span>
                </el-form-item>
                <el-form-item label="营业执照编号"
                              prop="licenseNumber">
                  <el-input v-model="wxSumbitForm.licenseNumber"></el-input>
                  <span>注意:[请填写营业执照上的注册号/统一社会信用代码,须为18位数字|大写字母]</span>
                </el-form-item>

                <div class="businessLicenseTime">
                  <el-form-item prop="periodBegin"
                                label="营业执照注册时间">
                    <el-date-picker v-model="wxSumbitForm.periodBegin"
                                    type="datetime"
                                    value-format="yyyy-MM-dd"
                                    placeholder="营业执照注册时间"
                                    @change="(event) => businessLicense(event, 'periodBegin')">
                    </el-date-picker>
                  </el-form-item>
                  <el-form-item :prop="wxSumbitForm.checked ? '' : 'periodEnd'"
                                label="营业执照结束时间">
                    <el-date-picker v-model="wxSumbitForm.periodEnd"
                                    type="datetime"
                                    :disabled="wxSumbitForm.checked"
                                    value-format="yyyy-MM-dd"
                                    placeholder="营业执照结束时间"
                                    @change="(event) => businessLicense(event, 'periodEnd')">
                    </el-date-picker>
                  </el-form-item>
                  <!-- 长期有效 	 -->

                  <el-checkbox style="margin: 22px 0 0 30px"
                               v-model="wxSumbitForm.checked"
                               @change="switchCheckbox">长期有效</el-checkbox>
                </div>

                <el-form-item label="营业执照地址"
                              prop="licenseAddress">
                  <el-input v-model="wxSumbitForm.licenseAddress"></el-input>
                </el-form-item>
                <!-- 营业执照 -->
                <el-form-item label="营业执照"
                              prop="licenseCopy">
                  <el-upload list-type="picture-card"
                             action="#"
                             ref="pictureUploadLicenseCopy"
                             :on-exceed="exceedFn"
                             :on-change="
                      (files, fileList) =>
                        handleFileChange(files, fileList, 'licenseCopy')
                    "
                             :before-upload="beforeAvatarUpload"
                             :limit="1"
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <!-- 图片的预览 -->
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>
                        <!-- 图片的下载 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>
                        <!-- 图片的移除 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'licenseCopy')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                  <el-dialog :visible.sync="dialogVisible">
                    <img width="100%"
                         :src="dialogImageUrl"
                         alt="" />
                  </el-dialog>
                  <span>注意:【请上传证件的彩色扫描件或彩色数码拍摄件，黑白复印件需加盖公章（公章信息需完整)】</span>
                </el-form-item>

                <!-- 门头照片 -->
                <el-form-item label="门头照片"
                              prop="storeEntrancePic">
                  <el-upload action="#"
                             ref="pictureUploadStoreEntrancePic"
                             list-type="picture-card"
                             :limit="5"
                             :on-exceed="exceedFn"
                             :on-change="
                      (files, fileList) =>
                        handleFileChange(files, fileList, 'storeEntrancePic')
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <!-- 图片的预览 -->
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>
                        <!-- 图片的下载 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>
                        <!-- 图片的移除 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'storeEntrancePic')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                  <el-dialog :visible.sync="dialogVisible">
                    <img width="100%"
                         :src="dialogImageUrl"
                         alt="" />
                  </el-dialog>
                  <span>注意:【门头照片必须要要与营业执照的名称相关，否则人工审核会失败】</span>
                </el-form-item>
                <!-- 办公环境 -->
                <el-form-item label="办公环境"
                              prop="indoorPic">
                  <el-upload action="#"
                             ref="pictureUploadIndoorPic"
                             list-type="picture-card"
                             :limit="5"
                             :on-exceed="exceedFn"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(file, fileList, 'indoorPic')
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <!-- 图片的预览 -->
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>
                        <!-- 图片的下载 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>
                        <!-- 图片的移除 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'indoorPic')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                  <el-dialog :visible.sync="dialogVisible">
                    <img width="100%"
                         :src="dialogImageUrl"
                         alt="" />
                  </el-dialog>
                  <span>注意:【办公环境如:餐饮店的照片、办公室、公司前台等照片...】</span>
                </el-form-item>
                <!-- 特殊资质 -->
                <el-form-item label="特殊资质"
                              prop="qualifications">
                  <el-upload action="#"
                             ref="pictureUploadQualifications"
                             list-type="picture-card"
                             :limit="5"
                             :on-exceed="exceedFn"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(file, fileList, 'qualifications')
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <!-- 图片的预览 -->
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>
                        <!-- 图片的下载 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>
                        <!-- 图片的移除 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'qualifications')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                  <el-dialog :visible.sync="dialogVisible">
                    <img width="100%"
                         :src="dialogImageUrl"
                         alt="" />
                  </el-dialog>
                  <span>注意:【根据商户经营业务要求提供相关资质，非必填...】</span>
                </el-form-item>

                <el-form-item label="所在行业"
                              prop="qualificationType">
                  <el-select v-model="wxSumbitForm.qualificationType"
                             placeholder="请选择"
                             @change="verifyChangesFn">
                    <el-option v-for="item in qualificationTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                  <div style="color: #b4b4b4">注意:[如找不到，请选择:商业及生活服务/房地产/房地产开发商]</div>
                </el-form-item>
              </div>
              <!-- 微信辅助类信息的填写 -->

              <div class="fromSubmitTwoWx"
                   v-if="currentStepIndex == 2">
                <h6 v-if="currentStepIndex !== 3"
                    class="hLabel">法人/负责人信息</h6>
                <el-form-item label="姓名"
                              :prop="currentStepIndex == 2 ? 'legalPerson' : ''">
                  <el-input placeholder="请输入姓名"
                            v-model="wxSumbitForm.legalPerson"></el-input>
                </el-form-item>
                <el-form-item label="身份证号"
                              :prop="currentStepIndex == 2 ? 'idCardNumber' : ''">
                  <el-input placeholder="请输入身份证"
                            v-model="wxSumbitForm.idCardNumber"
                            show-password></el-input>
                </el-form-item>
                <!-- 身份证正反面 -->
                <div class="positiveAndNegativeIDcards">
                  <!-- 身份证正面 -->
                  <el-form-item label="身份证正面"
                                :prop="currentStepIndex == 2 ? 'idCardCopy' : ''"
                                class="positiveIDcards">
                    <el-upload action="#"
                               ref="pictureUploadIdCardCopy"
                               :limit="1"
                               :on-exceed="exceedFn"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(file, fileList, 'idCardCopy')
                      "
                               list-type="picture-card"
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <!-- 图片的预览 -->
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>
                          <!-- 图片的下载 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>
                          <!-- 图片的移除 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'idCardCopy')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible">
                      <img width="100%"
                           :src="dialogImageUrl"
                           alt="" />
                    </el-dialog>
                  </el-form-item>

                  <!-- 身份证反面 -->
                  <el-form-item label="身份证反面"
                                :prop="currentStepIndex == 2 ? 'idCardNational' : ''">
                    <el-upload action="#"
                               list-type="picture-card"
                               :limit="1"
                               :on-exceed="exceedFn"
                               ref="pictureUploadIdCardNational"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(file, fileList, 'idCardNational')
                      "
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <!-- 图片的预览 -->
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>
                          <!-- 图片的下载 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>
                          <!-- 图片的移除 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'idCardNational')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible">
                      <img width="100%"
                           :src="dialogImageUrl"
                           alt="" />
                    </el-dialog>
                  </el-form-item>
                </div>
                <el-form-item label="身份证居住地"
                              prop="idCardAddress">
                  <el-input placeholder="请输入身份证居住地"
                            v-model="wxSumbitForm.idCardAddress"></el-input>
                </el-form-item>

                <!-- 身份证的时间 -->
                <el-form-item label="身份证的时间"
                              :prop="currentStepIndex == 2 ? 'IDCardDateRange' : ''">
                  <el-date-picker v-model="wxSumbitForm.IDCardDateRange"
                                  type="daterange"
                                  unlink-panels
                                  @change="IDCardDateRange"
                                  range-separator="至"
                                  start-placeholder="开始日期"
                                  end-placeholder="结束日期"
                                  format="yyyy-MM-dd"
                                  value-format="yyyy-MM-dd"
                                  class="ele-fluid" />
                </el-form-item>

                <h6 class="hLabel">经营信息</h6>

                <el-form-item label="店铺名称"
                              :prop="currentStepIndex == 2 ? 'bizStoreName' : ''">
                  <el-input placeholder="请输入店铺名称"
                            v-model="wxSumbitForm.bizStoreName"></el-input>
                </el-form-item>

                <el-form-item label="详细地址"
                              :prop="currentStepIndex == 2 ? 'bizAddressCode' : ''">
                  <regions-select v-model="wxSumbitForm.bizAddressCode"
                                  placeholder="请选择省市区"
                                  @input="regionsInput" />
                </el-form-item>

                <el-form-item label="线下场所地址"
                              :prop="currentStepIndex == 2 ? 'bizStoreAddress' : ''">
                  <el-input placeholder="请输入线下场所地址"
                            v-model="wxSumbitForm.bizStoreAddress"></el-input>
                </el-form-item>
                <el-form-item label="客服电话"
                              :prop="currentStepIndex == 2 ? 'servicePhone' : ''">
                  <el-input placeholder="请输入客服电话"
                            v-model="wxSumbitForm.servicePhone"></el-input>
                </el-form-item>
                <el-form-item label="手机号码"
                              :prop="currentStepIndex == 2 ? 'mobilePhone' : ''">
                  <el-input placeholder="请输入手机号码"
                            v-model="wxSumbitForm.mobilePhone"></el-input>
                </el-form-item>
                <el-form-item label="电子邮箱"
                              :prop="currentStepIndex == 2 ? 'contactEmail' : ''">
                  <el-input placeholder="请输入电子邮箱"
                            v-model="wxSumbitForm.contactEmail"></el-input>
                </el-form-item>
                <!-- 结算到银行卡 -->

                <h6 class="hLabel">结算到银行卡</h6>
                <el-form-item label="账号类型"
                              :prop="currentStepIndex == 2 ? 'bankAccountType' : ''">
                  <el-select v-model="wxSumbitForm.bankAccountType"
                             placeholder="请选择账号类型"
                             @change="verifyChangesFn">
                    <el-option v-for="item in bankAccountTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="证件类型"
                              :prop="currentStepIndex == 2 ? 'idDocType' : ''">
                  <el-select v-model="wxSumbitForm.idDocType"
                             placeholder="请选择证件类型"
                             @change="verifyChangesFn">
                    <el-option v-for="item in idDocTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="开户银行"
                              :prop="currentStepIndex == 2 ? 'accountBank' : ''">
                  <el-select v-model="wxSumbitForm.accountBank"
                             placeholder="请选择开户银行"
                             @change="accountBankFn">
                    <el-option v-for="item in accountBankOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                  <div style="color: #b4b4b4">17家直连银行，请根据开户银行，非17家直连银行，该参数请填写为“其他银行”</div>
                </el-form-item>
                <div v-if="otherBanks">
                  <el-form-item label="开户银行全称"
                                :prop="currentStepIndex == 2 ? 'bankName' : ''">
                    <el-input placeholder="请输入开户银行全称"
                              v-model="wxSumbitForm.bankName"></el-input>
                  </el-form-item>

                  <el-form-item label="开户银行联行号"
                                :prop="currentStepIndex == 2 ? 'bankBranchId' : ''">
                    <el-input placeholder="请输入开户银行联行号"
                              v-model="wxSumbitForm.bankBranchId"></el-input>
                  </el-form-item>
                </div>
                <el-form-item label="开户的银行省/市"
                              :prop="currentStepIndex == 2 ? 'bankAddressCode' : ''">
                  <regions-select v-model="wxSumbitForm.bankAddressCode"
                                  placeholder="请选择省市区"
                                  @input="regionsInput" />
                </el-form-item>
                <el-form-item label="开户名称"
                              :prop="currentStepIndex == 2 ? 'accountName' : ''">
                  <el-input placeholder="请输入开户名称"
                            v-model="wxSumbitForm.accountName"></el-input>
                  <span>1、选择经营者个人银行卡时，开户名称必须与身份证姓名一致。<br />
                    2、选择对公账户时，开户名称必须与营业执照上的“商户名称”一致。</span>
                </el-form-item>
                <el-form-item label="银行账号"
                              :prop="currentStepIndex == 2 ? 'accountNumber' : ''">
                  <el-input show-password
                            placeholder="请输入银行账号"
                            v-model="wxSumbitForm.accountNumber"></el-input>
                </el-form-item>
              </div>
              <div class="drawer__footer"
                   v-if="currentStepIndex !== 3">
                <el-button round
                           @click="$refs.drawer.closeDrawer()">取 消</el-button>
                <div class="drawerFooterRight">
                  <el-button round
                             @click="resetForm('wxSumbitForm')"
                             type="success">重置</el-button>
                  <el-button v-if="currentStepIndex == 2"
                             round
                             @click="previousPage"
                             type="success">上一页</el-button>
                  <el-button round
                             type="success"
                             @click="submitForm('wxSumbitForm')">{{ currentStepIndex == 1 ? '下一步' : '提交' }}</el-button>
                </div>
              </div>
            </el-form>

            <!-- 审核中的 -->
            <div class="fromSubmitThree"
                 v-if="incomingStatus != 3 && currentStepIndex == 3">
              <img src="../../../static/examineing.png"
                   alt="" />
              <div class="examine">资料正在审核中</div>
              <div style="color: '#666'">预计需要1-7个工作日进行审核,请耐心等待~</div>
              <el-button class="closePage"
                         @click="cancelForm"
                         round>关闭页面</el-button>
            </div>
          </div>
          <!-- 审核失败的 -->
          <div class="fromSubmitThree"
               v-if="incomingStatus == 3 && currentStepIndex == 3">
            <img src="../../../static/examineFail.png"
                 alt="" />
            <div class="examine">进件失败</div>
            <div style="color: '#666'">{{ rejectReason }}</div>
            <div class="resubmit"
                 @click="
                currentPlatform !== '总平台' ? innerVisibleFn() : cancelForm()
              "
                 round>{{ currentPlatform !== '总平台' ? '重新提交' : '关闭页面' }}</div>
          </div>
        </el-col>
        <!-- <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="11"><div class="bg-purple-light"></div></el-col> -->
      </el-row>
    </el-drawer>
    <ele-modal width="600px"
               height="300px"
               :title="incomingStatus == 5 ? '签约提示' : '驳回原因'"
               :visible.sync="visibleModal"
               :maxable="true">
      <!-- class="SigningReminder" -->
      <div style="padding: 0 0 30px 0; line-height: 18px"
           v-if="incomingStatus == 5">
        <h6>1、超级管理员用微信扫码，关注“微信支付商家助手”公众号后，公众号将自动发送签约消息；超管需点击消息，根据指引完成核对联系信息、账户验证、签约等操作</h6>
        <h6>2、超管完成核对联系信息，后续申请单进度可通过公众号自动通知超级管理员。</h6>
        <div style="text-align: center">
          <img alt=""
               :src="signUrl"
               style="width: 216px; height: 250px" />
        </div>
      </div>
      <!-- <div style="padding: 30px 0; line-height: 18px"
           v-if="incomingStatus==3">
        <h6 style="color: red;">{{ rejectReason }}</h6>

      </div> -->
      <span slot="footer"
            class="dialog-footer">
        <el-button @click="visibleModal = false">取 消</el-button>
        <el-button type="primary"
                   @click="visibleModal = false">{{
          incomingStatus == 3 ? '重新审核' : '确 定'
        }}</el-button>
      </span>
    </ele-modal>

  </div>
</template>

<script>
import { getToken } from '@/utils/token-util';
import { userOssSignature } from '@/api/creatCenter/material';
import UserSearch from './components/user-search.vue';
import UserEdit from './components/user-edit.vue';
import UserImport from './components/user-import.vue';
import EquipmentEdit from './components/equipment-edit.vue';
import RegionsSelect from '@/components/RegionsSelect/index.vue';
import incomingDetails from './components/incomingDetails.vue';
import {
  wxGetUploadMediaId,
  wxSumbitMerchantApplyFor,
  zfbGetUploadMediaId,
  zfbMerchantCreate
} from '@/api/douApi';
import {
  pageMerchant,
  removeUsers,
  updateUserStatus,
  resetPassword,
  updateUserPassword,
  pageAgencyType
} from '@/api/oem';
import { JSEncrypt } from 'jsencrypt';
// 导入组件
import {
  oemQueryAgentList,
  oemAgentListQueryBusiness,
  dsfmerenterinfoPage,
  selectByPrimaryKey
} from '@/api/lncomingManagement/incomingListApi';
import ElImageViewer from 'element-ui/packages/image/src/image-viewer';
import Steps from '@/components/Steps/Steps.vue';
import { getRegionLabel } from 'ele-admin/packages/utils/regions';
import axios from 'axios';
import {
  certTypeList,
  mccOptions,
  optionsServiceList,
  qualificationTypeOptions,
  accountBankOptions,
  bankAccountTypeOptions,
  usageTypeOptions,
  accountTypeOptions,
  rules,
  list,
  idDocTypeOptions,
  wxSumbitForm,
  validateLogo,
  storeEntrancePicLogo,
  indoorPicLogo,
  idCardCopyLogo,
  idCardNationalLogo,
  qualificationsLogo,
  outDoorImagesLogo,
  inDoorImagesLogo,
  certImageLogo,
  certImageBackLogo,
  zfbSumbitForm,
  oemList,
  merchanApplyForStatusList
} from './constant/constant';
export default {
  name: 'agentIncomingList',
  components: {
    UserSearch,
    EquipmentEdit,
    UserEdit,
    UserImport,
    ElImageViewer,
    Steps,
    RegionsSelect,
    incomingDetails
  },
  data () {
    validateLogo;
    storeEntrancePicLogo,
      indoorPicLogo,
      idCardCopyLogo,
      idCardNationalLogo,
      qualificationsLogo;
    outDoorImagesLogo, inDoorImagesLogo, certImageLogo, certImageBackLogo;

    return {
      wxSumbitForm,
      certTypeList,
      mccOptions,
      optionsServiceList,
      qualificationTypeOptions,
      accountBankOptions,
      bankAccountTypeOptions,
      usageTypeOptions,
      accountTypeOptions,
      rules,
      list,
      idDocTypeOptions,
      zfbSumbitForm,

      windowHeight: document.documentElement.clientHeight,
      // 当前编辑数据
      current: null,
      // 是否显示编辑弹窗
      showEdit: false,
      visibleModal: false,
      dialogImageUrl: '',
      dialogVisible: false,
      disabled: false,
      // 是否弹框
      drawer: false,
      // 代理类型list
      typeList: [],
      //   驳回原因
      rejectReason: '',
      //   下属代理配置
      subordinateAgentList: [],
      //  商家进件id
      merchantIdList: [],
      //   加载中
      loading: false,
      merchanApplyForStatusList: [],
      omeId: '',
      //  当前进件列表的id
      id: '',

      // 表格列配置
      columns: [
        {
          columnKey: 'selection',
          type: 'selection',
          width: 45,
          align: 'center',
          fixed: 'left',
          sortable: true
        },
        {
          columnKey: 'index',
          type: 'index',
          label: '序号',
          width: 60,
          align: 'center',
          showOverflowTooltip: true,
          fixed: 'left',
          sortable: true
        },
        {
          prop: 'merchantName',
          //   prop: 'MerchantName',
          label: '商家名称',
          sortable: 'custom',
          showOverflowTooltip: true,
          minWidth: 110,
          align: 'center',
          sortable: true
        },

        {
          prop: 'oemName',
          label: '所属代理',
          sortable: 'custom',
          showOverflowTooltip: true,
          minWidth: 110,
          align: 'center',
          sortable: true
        },
        {
          prop: 'applyForType',
          label: '进件类型',
          sortable: 'custom',
          showOverflowTooltip: true,
          minWidth: 70,
          slot: 'applyForType',
          align: 'center',
          sortable: true

        },

        {
          prop: 'corporateName',
          label: '商户名称',
          sortable: 'custom',
          showOverflowTooltip: true,
          minWidth: 110,
          align: 'center',
          sortable: true
        },
        {
          prop: 'merchanApplyForStatus',
          label: '进件状态',
          sortable: 'custom',
          showOverflowTooltip: true,
          minWidth: 110,
          slot: 'merchanApplyForStatus',
          align: 'center',
          sortable: true
        },
        {
          prop: 'createDate',
          label: '申请时间',
          align: 'center',
          sortable: 'custom',
          showOverflowTooltip: true,
          minWidth: 150,
          formatter: (_row, _column, cellValue) => {
            return this.$util.toDateString(cellValue);
          }
        },

        {
          columnKey: 'action',
          label: '操作',
          width: 350,
          align: 'center',
          resizable: false,
          slot: 'action',
          showOverflowTooltip: true,
          fixed: 'right'
        }
      ],

      // 微信存储的图片
      wxPictureArr: [],
      // 支付宝存储的图片
      zfbPictureArr: [],
      // 获取图片列表
      pictureList: [],
      // 获取图片文件列表
      fileList: [],
      // 表格选中数据
      selection: [],
      // 当前编辑数据
      current: null,
      // 是否显示编辑弹窗
      showEdit: false,
      // 是否显示导入弹窗
      showImport: false,
      //是否显示划拨编辑弹窗
      showTransfer: false,
      showViewer: false, // 显示查看器

      //步骤标题
      stepsLabel: ['主体信息', '辅助类信息', '提交完成'],
      //   步骤描述
      stepsDesc: ['准备营业执照', '发布配置', '选择素材'],

      labelPosition: 'top',

      listLength: 0, //图片数量

      // 状态 1 为 微信 2 为支付宝 3为查看详情
      jjstatus: '',

      //  wx当前步骤 默认为第一步
      currentStepIndex: 1,
      // 支付宝 步骤
      zfbCurrentStepIndex: 1,
      // 其他银行
      otherBanks: false,

      //   ref 图片
      uploadFilesArr: [],
      //   签约二维码
      signUrl: '',
      // 进件流程状态
      incomingStatus: '',
      //   当前所在平台
      currentPlatform: ''
    };
  },
  // 路由刷新
  activated () {
    this.init();

    this.merchanApplyForStatusList = merchanApplyForStatusList;
    if (
      this.$store.state.user.info.oemId == null &&
      this.$store.state.user.info.merchantId == null
    ) {
      console.log('总平台');
      this.currentPlatform = '总平台';
    } else if (
      this.$store.state.user.info.oemId !== null &&
      this.$store.state.user.info.merchantId == null
    ) {
      console.log('oem代理');
      this.currentPlatform = 'oem代理';
    } else {
      console.log('商家端');
      this.currentPlatform = '商家端';
    }
    console.log(this.$store.state.user.info.oemId);
    this.oemId = this.$store.state.user.info.oemId;
  },
  created () {
    this.initRules();
    // this.currentStepIndex = 1
  },
  computed: {
    // 是否开启响应式布局
    styleResponsive () {
      return this.$store.state.theme.styleResponsive;
    },
    applyForType () {
      return function (applyType) {
        if (applyType == '1') {
          return '微信';
        } else {
          return '支付宝';
        }
      };
    },

    merchanApplyForStatus () {
      return function (applyType) {
        if (applyType == '1') {
          return {
            status: '未进件',
            type: 'info'
          };
        } else if (applyType == '2') {
          return {
            status: '审核中',
            type: ''
          };
        } else if (applyType == '3') {
          return {
            status: '已驳回',
            type: 'danger'
          };
        } else if (applyType == '4') {
          return {
            status: '待验证发布',
            type: ''
          };
        } else if (applyType == '5') {
          return {
            status: '待签约',
            type: ''
          };
        } else if (applyType == '6') {
          return {
            status: '开通权限中',
            type: ''
          };
        } else if (applyType == '7') {
          return {
            status: '已完成',
            type: 'success'
          };
        } else if (applyType == '8') {
          return {
            status: '已作废',
            type: 'danger'
          };
        }
      };
    }
  },
  methods: {
    copySrc (link) {

      this.$copyText(link).then(
        (e) => {
          this.$message({
            message: '复制成功',
            type: 'success'
          });
        },
        (e) => {
          this.$message.error('复制失败');
        }
      );

    },

    innerVisibleFn () {
      //   如果状态为3 显示重新进件
      if (this.incomingStatus == 3) {
        this.openWeInbound(1);
        this.currentStepIndex = 1;
      }
    },
    // 打开对话框
    openElDialog (url, status) {
      this.incomingStatus = status;
      this.signUrl = url;
      console.log(this.signUrl);
      this.visibleModal = !this.visibleModal;
    },

    handleClose (done) {
      this.$confirm('是否要返回进件列表页面关闭？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then((_) => {
          done();
        })
        .catch((_) => { });
    },
    // 切换进件结算类型
    switchSettlementType (settlementType) {
      console.log(settlementType);
      this.zfbSumbitForm.defaultSettleType = settlementType;
      this.initRules();
      this.zfbSumbitForm.defaultSettleTarget = '';
    },
    initRules () {
      console.log(this.zfbSumbitForm.merchantType);
      this.$set(this.rules, 'certNo', [
        { required: true, message: '请填写商户证件编号', trigger: 'blur' },
        {
          pattern:
            this.zfbSumbitForm.merchantType !== '06'
              ? /^[A-Z0-9]{18}$/
              : /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
          message:
            this.zfbSumbitForm.merchantType !== '06'
              ? '营业执照上的注册号/统一社会信用代码格式不对'
              : '身份证输入不合法'
        }
      ]);

      this.$set(this.rules, 'defaultSettleTarget', [
        { required: true, message: '请填写商户证件编号', trigger: 'blur' },
        {
          pattern:
            this.zfbSumbitForm.defaultSettleType == 'bankCard'
              ? /^([1-9])(\d{15}|\d{16}|\d{17}|\d{18})$/
              : /^[a-zA-Z0-9][a-zA-Z0-9._]{4,18}[a-zA-Z0-9]$/,
          message:
            this.zfbSumbitForm.defaultSettleType == 'bankCard'
              ? '请输入银行卡号'
              : '请输入支付宝账号登录号'
        }
      ]);
    },
    // mcc
    handleChangeMcc (value) {
      if (this.zfbSumbitForm.mcc.length) {
        this.$refs.zfbSumbitForm.clearValidate('mcc');
      }
      console.log(value[1]);
    },
    inputFn (e) {
      this.wxSumbitForm.idCardName = e;
      console.log(e);
    },
    verifyChangesFn (e) {
      console.log(e, this.wxSumbitForm.qualificationType);
      if (this.wxSumbitForm.qualificationType) {
        this.$refs.wxSumbitForm.clearValidate('qualificationType');
      }
      if (this.wxSumbitForm.idDocType) {
        this.$refs.wxSumbitForm.clearValidate('idDocType');
      }
      if (this.wxSumbitForm.bankAccountType) {
        this.$refs.wxSumbitForm.clearValidate('bankAccountType');
      }
      if (this.wxSumbitForm.usageType) {
        this.$refs.wxSumbitForm.clearValidate('usageType');
      }
      if (this.wxSumbitForm.accountType) {
        this.$refs.wxSumbitForm.clearValidate('accountType');
      }
      if (this.wxSumbitForm.serviceList) {
        this.$refs.wxSumbitForm.clearValidate('serviceList');
      }
    },
    // 提交图片之前的一些限制

    beforeAvatarUpload (file) {
      // const isJPG = file.type === 'image/jpeg';
      console.log(file);
      const isJPG = file.raw.type;
      const isLt2M = file.raw.size / 1024 / 1024 < 2;

      const extension1 = file.raw.type === 'image/jpg';
      const extension2 = file.raw.type === 'image/jpeg';
      const extension3 = file.raw.type === 'image/png';
      const extension4 = file.raw.type === 'image/bmp';
      if (!extension1 && !extension2 && !extension3 && !extension4) {
        this.$message.error('请上传jpg 、png、jpeg 类型图片!');
      }
      if (!isLt2M) {
        this.$message.error('上传图片大小不能超过 2MB!');
      }
      return isJPG && isLt2M;
    },
    accountBankFn (item) {
      if (this.wxSumbitForm.accountBank) {
        this.$refs.wxSumbitForm.clearValidate('accountBank');
      }
      console.log(item);
      // console.log('http://' + window.location.host.split(':')[0]);
      if (item == '其他银行') {
        this.otherBanks = !this.otherBanks;
      } else {
        this.otherBanks = false;
      }
    },
    // 身份证有效时间
    IDCardDateRange (timeArr) {
      console.log(timeArr);
      //   开始时间
      this.wxSumbitForm.cardPeriodBegin = timeArr[0];
      //   结束时间
      this.wxSumbitForm.cardPeriodEnd = timeArr[1];
    },

    // 清除城市的校验
    regionsInput (value, nameCode) {
      console.log(value, '==============', nameCode);
      if (nameCode == 'licenseCode') {
        this.zfbSumbitForm.provinceCode = value[0];
        this.zfbSumbitForm.cityCode = value[1];
        this.zfbSumbitForm.districtCode = value[2];
      }
      if (nameCode == 'accountInstCode') {
        console.log(getRegionLabel(value));
        const regionLabel = getRegionLabel(value);
        // 开户行所在的省
        this.zfbSumbitForm.accountInstProvince = regionLabel[0];
        // 开户行所在的市
        this.zfbSumbitForm.accountInstCity = regionLabel[1];
      }
      if (this.wxSumbitForm.bizAddressCode.length) {
        this.$refs.wxSumbitForm.clearValidate('bizAddressCode');
      }
      if (this.wxSumbitForm.bankAddressCode.length) {
        this.$refs.wxSumbitForm.clearValidate('bankAddressCode');
      }
      if (this.zfbSumbitForm.districtCode.length) {
        this.$refs.zfbSumbitForm.clearValidate('districtCode');
      }
      if (this.zfbSumbitForm.licenseCode.length) {
        this.$refs.zfbSumbitForm.clearValidate('licenseCode');
      }
      if (this.zfbSumbitForm.accountInstCode.length) {
        this.$refs.zfbSumbitForm.clearValidate('accountInstCode');
      }
    },
    // 勾选 有效期 那么periodEnd变为长期
    switchCheckbox (checked) {
      this.wxSumbitForm.checked = checked;
      // 如果勾选 那么营业结束时间变为长期
      if (checked) {
        this.wxSumbitForm.periodEnd = '';
      } else {
        this.wxSumbitForm.periodEnd = '';
      }
    },
    // 营业执照有效时间
    businessLicense (timeArr, periodName) {
      console.log(timeArr, periodName);
      //   开始时间
      if (periodName == 'periodBegin') {
        this.wxSumbitForm.periodBegin = timeArr;
      } else {
        //   结束时间
        this.wxSumbitForm.periodEnd = timeArr;
      }
    },
    //  图片上传个数超过限制
    exceedFn () {
      this.$message({
        message: '图片上传已达到上限,请删除后再上传',
        type: 'warning'
      });
    },
    // 这里对图片上传以后当图片数量大于0则去除校验提示

    handleFileChange (file, fileList, name) {
      if (file.status !== 'ready') return;
      const isPass = this.beforeAvatarUpload(file);
      console.log(isPass);
      if (!isPass) {
        this.handleRemove(file, name);
        return;
      }

      //图片上传后
      console.log(file);
      this.listLength = fileList.length;
      if (name == 'licenseCopy') {
        this.wxSumbitForm.licenseCopy = file.name;
      } else if (name == 'qualifications') {
        this.wxSumbitForm.qualifications = file.name;
      } else if (name == 'storeEntrancePic') {
        this.wxSumbitForm.storeEntrancePic = file.name;
      } else if (name == 'indoorPic') {
        this.wxSumbitForm.indoorPic = file.name;
      } else if (name == 'idCardCopy') {
        this.wxSumbitForm.idCardCopy = file.name;
      } else if (name == 'idCardNational') {
        this.wxSumbitForm.idCardNational = file.name;
      } else if (name == 'inDoorImages') {
        this.zfbSumbitForm.inDoorImages = file.name;
      } else if (name == 'certImage') {
        this.zfbSumbitForm.certImage = file.name;
      } else if (name == 'certImageBack') {
        this.zfbSumbitForm.certImageBack = file.name;
      } else if (name == 'outDoorImages') {
        this.zfbSumbitForm.outDoorImages = file.name;
      }
      this.$nextTick(() => {
        let uploadFiles;
        if (name == 'idCardCopy') {
          uploadFiles = this.$refs.pictureUploadIdCardCopy.uploadFiles;
          this.uploadFilesArr.push(uploadFiles[0]);
        }
        if (name == 'idCardNational') {
          uploadFiles = this.$refs.pictureUploadIdCardNational.uploadFiles;
          this.uploadFilesArr.push(uploadFiles[0]);
        }
      });
      fileList.forEach((item) => {
        item.imgType = name;
      });
      let files = fileList[fileList.length - 1];
      this.fileList.push(files);
      console.log(file, fileList, this.fileList, name);
      if (this.listLength > 0) {
        // 这里还需要判断一下图片的类型 只有有当前的类型才去除验证
        const fileObject = this.fileList.find((item, index) => {
          return item.imgType == name;
        });
        if (this.jjstatus == '1') {
          this.$refs.wxSumbitForm.clearValidate(fileObject.imgType); //当图片数量大于0则去除校验提示
        } else {
          this.$refs.zfbSumbitForm.clearValidate(fileObject.imgType); //当图片数量大于0则去除校验提示
        }
      }
      if (this.jjstatus == '1') {
        this.wxUploadBj();
      } else {
        this.zfbUploadBj();
      }
    },
    handleRemove (file, removeName) {
      let uploadFiles;
      // 进行判断 对不同的数据进行不同的图片的删除
      if (removeName == 'licenseCopy') {
        uploadFiles = this.$refs.pictureUploadLicenseCopy.uploadFiles;
      } else if (removeName == 'storeEntrancePic') {
        uploadFiles = this.$refs.pictureUploadStoreEntrancePic.uploadFiles;
      } else if (removeName == 'indoorPic') {
        uploadFiles = this.$refs.pictureUploadIndoorPic.uploadFiles;
      } else if (removeName == 'qualifications') {
        uploadFiles = this.$refs.pictureUploadQualifications.uploadFiles;
      } else if (removeName == 'pictureUploadIdCardCopy') {
        uploadFiles = this.$refs.pictureUpload.uploadFiles;
      } else if (removeName == 'idCardCopy') {
        uploadFiles = this.$refs.pictureUploadIdCardCopy.uploadFiles;
      } else if (removeName == 'idCardNational') {
        uploadFiles = this.$refs.pictureUploadIdCardNational.uploadFiles;
      } else if (removeName == 'outDoorImages') {
        uploadFiles = this.$refs.pictureUploadOutDoorImages.uploadFiles;
      } else if (removeName == 'inDoorImages') {
        uploadFiles = this.$refs.pictureUploadInDoorImages.uploadFiles;
      } else if (removeName == 'certImage') {
        uploadFiles = this.$refs.pictureUploadIdCertImage.uploadFiles;
      } else if (removeName == 'certImageBack') {
        uploadFiles = this.$refs.pictureUploadIdCertImage.uploadFiles;
      }
      console.log(file, uploadFiles, this.uploadFilesArr);

      // 获取到该图片的uid 去  this.fileList 去匹配到uid 找到然后去删除掉
      if (this.fileList.length) {
        const uidIndex = this.fileList.findIndex((item, index) => {
          return item.uid == file.uid;
        });
        console.log(uidIndex);
        if (uidIndex !== -1) {
          this.fileList.splice(uidIndex, 1);
        }
      }

      this.uploadFilesArr.forEach((item, index) => {
        if (item.url == file.url) {
          this.uploadFilesArr.splice(index, 1);
        }
      });
      for (let i = 0; i < uploadFiles.length; i++) {
        if (uploadFiles[i]['url'] == file.url) {
          uploadFiles.splice(i, 1);
        }
      }

      console.log(this.uploadFiles);
      console.log(this.uploadFilesArr);
      // 需要把对应上传的图片和 和id 需要删除

      if (this.jjstatus == '1') {
        const picIndex = this.wxPictureArr.findIndex((item) => {
          return item.uid == file.raw.uid;
        });

        this.wxPictureArr.splice(picIndex, 1);
      } else {
        const picIndex = this.zfbPictureArr.findIndex((item) => {
          return item.uid == file.raw.uid;
        });

        this.zfbPictureArr.splice(picIndex, 1);
      }

      if (removeName == 'licenseCopy') {
        const mediaIdIndex = this.wxSumbitForm.licenseCopyMediaId.findIndex(
          (item) => {
            return item.uid == file.uid;
          }
        );
        this.wxSumbitForm.licenseCopyMediaId.splice(mediaIdIndex, 1);
      } else if (removeName == 'storeEntrancePic') {
        const mediaIdIndex =
          this.wxSumbitForm.storeEntrancePicMediaId.findIndex((item) => {
            return item.uid == file.uid;
          });
        this.wxSumbitForm.storeEntrancePicMediaId.splice(mediaIdIndex, 1);
      } else if (removeName == 'qualifications') {
        const mediaIdIndex =
          this.wxSumbitForm.qualificationsMediaId.findIndex((item) => {
            return item.uid == file.uid;
          });
        this.wxSumbitForm.qualificationsMediaId.splice(mediaIdIndex, 1);
      } else if (removeName == 'idCardCopy') {
        const mediaIdIndex = this.wxSumbitForm.idCardCopyMediaId.findIndex(
          (item) => {
            return item.uid == file.uid;
          }
        );
        this.wxSumbitForm.idCardCopyMediaId.splice(mediaIdIndex, 1);
      } else if (removeName == 'indoorPic') {
        const mediaIdIndex = this.wxSumbitForm.indoorPicMediaId.findIndex(
          (item) => {
            return item.uid == file.uid;
          }
        );
        this.wxSumbitForm.indoorPicMediaId.splice(mediaIdIndex, 1);
      } else if (removeName == 'idCardNational') {
        const mediaIdIndex =
          this.wxSumbitForm.idCardNationalMediaId.findIndex((item) => {
            return item.uid == file.uid;
          });
        this.wxSumbitForm.idCardNationalMediaId.splice(mediaIdIndex, 1);
      } else if (removeName == 'outDoorImages') {
        const mediaIdIndex = this.zfbSumbitForm.outDoorImagesOssKey.findIndex(
          (item) => {
            return item.uid == file.uid;
          }
        );
        this.zfbSumbitForm.outDoorImagesOssKey.splice(mediaIdIndex, 1);
      } else if (removeName == 'inDoorImages') {
        const mediaIdIndex = this.zfbSumbitForm.inDoorImagesOssKey.findIndex(
          (item) => {
            return item.uid == file.uid;
          }
        );
        this.zfbSumbitForm.inDoorImagesOssKey.splice(mediaIdIndex, 1);
      } else if (removeName == 'certImage') {
        const mediaIdIndex = this.zfbSumbitForm.certImageOssKey.findIndex(
          (item) => {
            return item.uid == file.uid;
          }
        );
        this.zfbSumbitForm.certImageOssKey.splice(mediaIdIndex, 1);
      } else if (removeName == 'certImageBack') {
        const mediaIdIndex = this.zfbSumbitForm.certImageBackOssKey.findIndex(
          (item) => {
            return item.uid == file.uid;
          }
        );
        this.zfbSumbitForm.certImageBackOssKey.splice(mediaIdIndex, 1);
      }

      if (this.jjstatus == '1') {
        this.wxSumbitFilter();
      } else {
        this.zfbSumbitFilter();
      }
    },

    // 微信下属代理
    async getAgentParentIdList (ParentId, agentName) {
      console.log(ParentId, agentName);
      if (this.wxSumbitForm.subordinateAgent) {
        this.$refs.wxSumbitForm.clearValidate('subordinateAgent');
      }

      //   拿到ParentId 获取到商家信息
      const res = await oemAgentListQueryBusiness({
        limit: 10,
        oemId: ParentId,
        page: 1
      });
      console.log(res.data);
      this.wxSumbitForm.merchantId = '';
      if (res.data.list.length && res.code == 2000) {
        const merchantData = res.data.list.map((item, i) => {
          return {
            label: item.merchantName,
            value: item.id
          };
        });

        this.merchantIdList = merchantData;
      }
    },
    async wxUploadBj () {
      if (this.fileList.length < 1) {
        console.log('请选择文件后提交');
        this.$message.error('请选择文件后提交');
        return;
      }

      this.disabled = true;
      this.data = await userOssSignature();
      console.log(this.fileList[this.fileList.length - 1]);

      let file = this.fileList[this.fileList.length - 1].raw;
      let imgType = this.fileList[this.fileList.length - 1].imgType;
      let filename = file.name;
      let markIndex = filename.lastIndexOf('.');
      let suffix = filename.substring(markIndex);
      let date = new Date().getTime();
      // 构建请求参数
      let param = new FormData();
      param.append('key', this.data.dir + imgType + '/' + date + suffix);
      param.append('policy', this.data.policy);
      param.append('OSSAccessKeyId', this.data.accessId);
      param.append('success_action_status', '200');
      // param.append("callback",  this.data.callback)     //回调（not)
      param.append('signature', this.data.signature);
      param.append('file', file, file.name);
      param.append('success_action_status', '200');
      let config = {
        headers: {
          'Access-Control-Allow-Origin': '*',
          'x-oss-callback-Authorization': getToken()
        }
      };
      console.log('suffix', suffix);

      let res = await axios.post(this.data.host, param, config);
      let url;
      if (res.status == 200) {
        url = this.data.host + '/' + imgType + '/' + date + suffix;

        console.log('上传图片成功=======', res);
        console.log('this.data.host', url);

        this.wxPictureArr.push({ picUrls: url, uid: file.uid });
      } else {
        this.$message.error('上传失败');
      }

      const result = await wxGetUploadMediaId([url]);

      // console.log(result);

      // 当个MediaId 是字符串 多个是数组  营业执照和正反面的身份证是字符串格式其他的都是数组格式
      if (result.data.code == 200) {
        if (imgType == 'licenseCopy') {
          // 营业执照照片
          this.wxSumbitForm.licenseCopyMediaId = [
            { id: result.data.data.mediaId, uid: file.uid }
          ];
          console.log(this.wxSumbitForm.licenseCopyMediaId);
        } else if (imgType == 'storeEntrancePic') {
          // 门头照片
          this.wxSumbitForm.storeEntrancePicMediaId.push({
            id: result.data.data.mediaId,
            uid: file.uid
          });
          console.log(this.wxSumbitForm.storeEntrancePic);
        } else if (imgType == 'indoorPic') {
          // 办公环境
          this.wxSumbitForm.indoorPicMediaId.push({
            id: result.data.data.mediaId,
            uid: file.uid
          });
          console.log(this.wxSumbitForm.indoorPicMediaId);
        } else if (imgType == 'qualifications') {
          // 特殊资历
          this.wxSumbitForm.qualificationsMediaId.push({
            id: result.data.data.mediaId,
            uid: file.uid
          });
          console.log(this.wxSumbitForm.qualificationsMediaId);
        } else if (imgType == 'idCardCopy') {
          // 正面身份证头像
          this.wxSumbitForm.idCardCopyMediaId = [
            { id: result.data.data.mediaId, uid: file.uid }
          ];
          console.log(this.wxSumbitForm.idCardCopyMediaId);
        } else if (imgType == 'idCardNational') {
          // 反面身份证头像
          this.wxSumbitForm.idCardNationalMediaId = [
            { id: result.data.data.mediaId, uid: file.uid }
          ];
          console.log(this.wxSumbitForm.idCardNationalMediaId);
        }

        this.disabled = false;
      }
    },
    async zfbUploadBj () {
      if (this.fileList.length < 1) {
        console.log('请选择文件后提交');
        this.$message.error('请选择文件后提交');
        return;
      }
      this.data = await userOssSignature();

      let file = this.fileList[this.fileList.length - 1].raw;
      let imgType = this.fileList[this.fileList.length - 1].imgType;
      let filename = file.name;
      let markIndex = filename.lastIndexOf('.');
      let suffix = filename.substring(markIndex);
      let date = new Date().getTime();
      // 构建请求参数
      let param = new FormData();
      param.append('key', this.data.dir + imgType + '/' + date + suffix);
      param.append('policy', this.data.policy);
      param.append('OSSAccessKeyId', this.data.accessId);
      param.append('success_action_status', '200');
      // param.append("callback",  this.data.callback)     //回调（not)
      param.append('signature', this.data.signature);
      param.append('file', file, file.name);
      param.append('success_action_status', '200');
      let config = {
        headers: {
          'Access-Control-Allow-Origin': '*',
          'x-oss-callback-Authorization': getToken()
        }
      };
      console.log('suffix', suffix);

      let res = await axios.post(this.data.host, param, config);
      let url;
      if (res.status == 200) {
        url = this.data.host + '/' + imgType + '/' + date + suffix;

        console.log('上传图片成功=======', res);
        console.log('this.data.host', url);

        this.zfbPictureArr.push({ picUrls: url, uid: file.uid });
      } else {
        this.$message.error('上传失败');
      }
      //  获取到id
      const result = await zfbGetUploadMediaId([url]);

      console.log(result);

      // 当个MediaId 是字符串 多个是数组  营业执照和正反面的身份证是字符串格式其他的都是数组格式
      if (result.data.code == 200) {
        if (imgType == 'licenseCopy') {
          // 营业执照照片
          this.zfbSumbitForm.licenseCopyMediaId = result.data.data.imageId;
          console.log(this.zfbSumbitForm.licenseCopyMediaId);
        } else if (imgType == 'outDoorImages') {
          // 门头照片
          this.zfbSumbitForm.outDoorImagesOssKey.push({
            id: result.data.data.mediaId,
            uid: file.uid
          });
          // console.log(this.zfbSumbitForm.storeEntrancePic)
        } else if (imgType == 'inDoorImages') {
          // 办公环境
          this.zfbSumbitForm.inDoorImagesOssKey.push({
            id: result.data.data.mediaId,
            uid: file.uid
          });
        } else if (imgType == 'certImage') {
          // 正面身份证头像
          this.zfbSumbitForm.certImageOssKey = [
            { id: result.data.data.mediaId, uid: file.uid }
          ];
        } else if (imgType == 'certImageBack') {
          // 反面身份证头像
          this.zfbSumbitForm.certImageBackOssKey = [
            { id: result.data.data.mediaId, uid: file.uid }
          ];
        }
      }
    },
    wxSumbitFilter () {
      console.log(this.pictureList);
      this.pictureList = [];
      //  对图片进行分类

      this.wxPictureArr.forEach((item) => {
        this.pictureList.push(item.picUrls);
      });

      // 获取到不同的图片地址然后放到from表单中
      // 营业执照照片
      let licenseCopy = this.pictureList.filter((url) =>
        url.includes('licenseCopy')
      );

      this.wxSumbitForm.licenseCopy = licenseCopy.join(',');
      // 线下场所门头照片
      let storeEntrancePic = this.pictureList.filter((url) =>
        url.includes('storeEntrancePic')
      );
      this.wxSumbitForm.storeEntrancePic = storeEntrancePic.join(',');
      // 办公环境
      let indoorPic = this.pictureList.filter((url) =>
        url.includes('indoorPic')
      );
      this.wxSumbitForm.indoorPic = indoorPic.join(',');
      // 特殊资质图片
      let qualifications = this.pictureList.filter((url) =>
        url.includes('qualifications')
      );
      this.wxSumbitForm.qualifications = qualifications.join(',');
      // 身份证正面头像
      let idCardCopy = this.pictureList.filter((url) =>
        url.includes('idCardCopy')
      );
      this.wxSumbitForm.idCardCopy = idCardCopy.join(',');
      // 身份证反面头像
      let idCardNational = this.pictureList.filter((url) =>
        url.includes('idCardNational')
      );
      this.wxSumbitForm.idCardNational = idCardNational.join(',');
      console.log(this.wxSumbitForm);
    },
    zfbSumbitFilter () {
      //  对图片进行分类
      this.pictureList = [];
      this.zfbPictureArr.forEach((item) => {
        this.pictureList.push(item.picUrls);
      });

      // 获取到不同的图片地址然后放到from表单中
      console.log(this.pictureList);
      let outDoorImagesPic = this.pictureList.filter((url) =>
        url.includes('outDoorImages')
      );
      this.zfbSumbitForm.outDoorImages = outDoorImagesPic.join(',');
      // 办公环境
      let inDoorImagesPic = this.pictureList.filter((url) =>
        url.includes('inDoorImages')
      );
      this.zfbSumbitForm.inDoorImages = inDoorImagesPic.join(',');

      // 身份证正面头像
      let certImagePic = this.pictureList.filter(
        (url) => url.includes('certImage') && !url.includes('certImageBack')
      );
      console.log(certImagePic);
      this.zfbSumbitForm.certImage = certImagePic.join(',');
      // 身份证反面头像
      let certImageBackPic = this.pictureList.filter((url) =>
        url.includes('certImageBack')
      );
      this.zfbSumbitForm.certImageBack = certImageBackPic.join(',');

      console.log(this.wxSumbitForm);
    },
    async wxSumbit () {
      this.wxSumbitFilter();
      // 把submitFrom 转化为  {merchantsapplyfor:{}，businesslicense：{}}
      console.log(this.wxSumbitForm);
      let params = {
        merchantsapplyfor: {
          merchantId: this.wxSumbitForm.merchantId,
          subordinateAgent: this.wxSumbitForm.subordinateAgent,
          mobilePhone: this.wxSumbitForm.mobilePhone,
          contactEmail: this.wxSumbitForm.contactEmail,
          subjectType: this.wxSumbitForm.subjectType,
          idDocType: this.wxSumbitForm.idDocType,
          idCardCopy: this.wxSumbitForm.idCardCopy,
          // 身份证正面
          idCardCopyMediaId: this.wxSumbitForm.idCardCopyMediaId
            .map((item) => item.id)
            .join(),
          idCardNational: this.wxSumbitForm.idCardNational,
          // 身份证反面
          idCardNationalMediaId: this.wxSumbitForm.idCardNationalMediaId
            .map((item) => item.id)
            .join(),

          idCardName: this.wxSumbitForm.idCardName,
          idCardNumber: this.wxSumbitForm.idCardNumber,
          idCardAddress: this.wxSumbitForm.idCardAddress,
          cardPeriodBegin: this.wxSumbitForm.cardPeriodBegin,
          cardPeriodEnd: this.wxSumbitForm.cardPeriodEnd
        },
        businesslicense: {
          licenseCopy: this.wxSumbitForm.licenseCopy,
          // 营业执照 MediaId
          licenseCopyMediaId: this.wxSumbitForm.licenseCopyMediaId
            .map((item) => item.id)
            .join(),
          licenseNumber: this.wxSumbitForm.licenseNumber,
          merchantName: this.wxSumbitForm.merchantName,
          legalPerson: this.wxSumbitForm.legalPerson,
          licenseAddress: this.wxSumbitForm.licenseAddress,
          periodBegin: this.wxSumbitForm.periodBegin,
          periodEnd: this.wxSumbitForm.periodEnd
            ? this.wxSumbitForm.periodEnd
            : '长期'
        },
        bankaccount: {
          bankAccountType: this.wxSumbitForm.bankAccountType,
          accountName: this.wxSumbitForm.accountName,
          accountBank: this.wxSumbitForm.accountBank,
          bankBranchId: this.wxSumbitForm.bankBranchId,
          bankName: this.wxSumbitForm.bankName,
          accountNumber: this.wxSumbitForm.accountNumber,
          bankAddressCode: this.bankAddressCode()
        },
        businessinfo: {
          merchantShortname: this.wxSumbitForm.merchantShortname,
          servicePhone: this.wxSumbitForm.servicePhone,

          bizStoreName: this.wxSumbitForm.bizStoreName,
          bizAddressCode: this.bizAddressCode(),
          bizStoreAddress: this.wxSumbitForm.bizStoreAddress,
          storeEntrancePic: this.wxSumbitForm.storeEntrancePic,
          // 门头照片 MediaId
          storeEntrancePicMediaId:
            this.wxSumbitForm.storeEntrancePicMediaId.map((item) => item.id),
          indoorPic: this.wxSumbitForm.indoorPic,
          // 线下场所内部照片
          indoorPicMediaId: this.wxSumbitForm.indoorPicMediaId.map(
            (item) => item.id
          )
        },
        settlement: {
          settlementId: this.wxSumbitForm.settlementId,
          qualificationType: this.wxSumbitForm.qualificationType,
          qualifications: this.wxSumbitForm.qualifications,
          // 特殊资质 MediaId
          qualificationsMediaId: this.wxSumbitForm.qualificationsMediaId.map(
            (item) => item.id
          ),
          activitiesRate: this.wxSumbitForm.activitiesRate
        }
      };

      console.log(params);

      try {
        this.loading = true;
        const res = await wxSumbitMerchantApplyFor(params);
        console.log(res);
        if (res.data.code == 2000) {
          this.$message({
            message: res.data.msg,
            type: 'success'
          });

          this.loading = false;
        }
        if (res.data.code == 5000) {
          this.$message.error(res.data.msg);
          this.loading = false;
        }
      } catch (error) {
        this.$message.error(error);
      }
      this.pictureList = [];
    },
    async zfbSumbit () {
      this.zfbSumbitFilter();
      let params = {
        alipaymerchant: {
          // mcc
          mcc: this.zfbSumbitForm.mcc[1],
          // 商户类型
          merchantType: this.zfbSumbitForm.merchantType,
          // 商户名称
          name: this.zfbSumbitForm.name,
          // 商户别名
          aliasName: this.zfbSumbitForm.aliasName,

          // 商户证件编号
          certNo: this.zfbSumbitForm.certNo,
          // 商户证件类型
          certType: this.zfbSumbitForm.certType,
          // 法人名称
          legalName: this.zfbSumbitForm.legalName,
          // 法人身份证号
          legalCertNo: this.zfbSumbitForm.legalCertNo,
          // 联系人姓名
          contactName: this.zfbSumbitForm.contactName,
          // 联系人电话
          contactMobile: this.zfbSumbitForm.contactMobile,
          // 商户使用服务
          service: this.zfbSumbitForm.serviceList.join(','),
          // 商户使用服务  String[]
          serviceList: this.zfbSumbitForm.serviceList,
          // 结算支付宝账号
          alipayLogonId: this.zfbSumbitForm.alipayLogonId,
          // 营业执照名称
          certName: this.zfbSumbitForm.certName,
          // 签约支付宝账户
          bindingAlipayLogonId: this.zfbSumbitForm.bindingAlipayLogonId,
          // 默认结算类型
          defaultSettleType: this.zfbSumbitForm.defaultSettleType,
          // 默认结算目标
          defaultSettleTarget: this.zfbSumbitForm.defaultSettleTarget,
          // 办公环境
          inDoorImages: this.zfbSumbitForm.inDoorImages,
          // 办公环境OssKey
          inDoorImagesOssKey: this.zfbSumbitForm.inDoorImagesOssKey.map(
            (item) => item.id
          ),
          // 商户证件图片url
          certImage: this.zfbSumbitForm.certImage,
          // 商户证件图片urlOssKey
          certImageOssKey: this.zfbSumbitForm.certImageOssKey.map(
            (item) => item.id
          ),

          // 证件反面图片
          certImageBack: this.zfbSumbitForm.certImageBack,
          // 证件反面图片OssKey
          certImageBackOssKey: this.zfbSumbitForm.certImageBackOssKey.map(
            (item) => item.id
          ),
          // 城市编码
          cityCode: this.zfbSumbitForm.cityCode,
          // 区县编码
          districtCode: this.zfbSumbitForm.districtCode,
          // 营业执照地址
          address: this.zfbSumbitForm.address,
          // 省份编码
          provinceCode: this.zfbSumbitForm.provinceCode,
          // 门头照
          outDoorImages: this.zfbSumbitForm.outDoorImages,
          // 门头照OssKey
          outDoorImagesOssKey: this.zfbSumbitForm.outDoorImagesOssKey.map(
            (item) => item.id
          )
        },
        settlecardinfo: {
          // 卡户名
          accountHolderName: this.zfbSumbitForm.accountHolderName,
          // 银行卡号
          accountNo: this.zfbSumbitForm.accountNo,
          // 开户行所在地-省
          accountInstProvince: this.zfbSumbitForm.accountInstProvince,
          // 开户行所在地-市
          accountInstCity: this.zfbSumbitForm.accountInstCity,
          // 开户支行名
          accountBranchName: this.zfbSumbitForm.accountBranchName,
          // 账号使用类型
          usageType: this.zfbSumbitForm.usageType,
          // 银行卡类型
          accountType: this.zfbSumbitForm.accountType,
          // 银行名称
          accountInstName: this.zfbSumbitForm.accountInstName,
          // 开户行简称缩写
          accountInstId: this.zfbSumbitForm.accountInstId
        }
      };

      console.log(params);
      try {
        const res = await zfbMerchantCreate(params);
        console.log(res);
        if (res.data.code == 2000) {
          this.$message({
            message: res.data.msg,
            type: 'success'
          });
        }
        if (res.data.code == 5000) {
          this.$message.error(res.data.msg);
        }
      } catch (error) {
        this.$message.error(error);
      }
      this.pictureList = [];
    },
    // 微信商家id
    getMerchantIdList (merchantId, agentName) {
      if (this.wxSumbitForm.merchantId) {
        this.$refs.wxSumbitForm.clearValidate('merchantId');
      }
      console.log(merchantId, agentName);
    },
    //是否要关闭抽屉
    cancelForm () {
      console.log('1221313');
      this.drawer = false;
    },
    // 表单重置
    resetForm (formName) {
      console.log(formName);
      this.$refs[formName].resetFields();
    },
    // 对正则进行校验 ok了进行下一步
    submitForm (formName) {
      this.loading = true;
      this.$refs[formName].validate((valid) => {
        if (this.jjstatus == '1') {
          if (valid) {
            //如果成功那么进入下一步
            if (this.currentStepIndex == 1) {
              this.currentStepIndex = 2;
              console.log(this.uploadFilesArr);
              if (this.uploadFilesArr.length) {
                this.$nextTick(() => {
                  this.uploadFilesArr.forEach((item, index) => {
                    console.log(item);
                    item.url = URL.createObjectURL(item.raw);

                    if (item.imgType == 'idCardCopy') {
                      this.$refs.pictureUploadIdCardCopy.uploadFiles = [item];
                    }
                    if (item.imgType == 'idCardNational') {
                      this.$refs.pictureUploadIdCardNational.uploadFiles = [
                        item
                      ];
                    }
                  });
                });

              }

              return;
            } else if (this.currentStepIndex == 2) {
              this.wxSumbit();
            }
          } else {
            this.$message.error('参数填充有误,请填写完整参数在提交');

            return false;
          }
        } else {
          if (valid) {
            //如果成功那么进入下一步
            if (this.zfbCurrentStepIndex == 1) {
              this.zfbCurrentStepIndex = 2;
              cosnole.log(this.uploadFilesArr);

              return;
            } else if (this.zfbCurrentStepIndex == 2) {
              // 这里进行合并提交
              this.pictureList = [];

              this.zfbSumbit();
              // this.wxuploadBj();
            }
          } else {
            this.$message.error('参数填充有误,请填写完整参数在提交');
            return false;
          }
        }
      });
    },

    // 点击按钮预览图片
    onPreview () {
      this.showViewer = true;
    },
    // 关闭查看器
    closeViewer () {
      this.showViewer = false;
    },

    // 查询代理类型
    init () {
      pageAgencyType({
        deleted: 0,
        limit: 10,
        page: 1,
        types: 1
      })
        .then((data) => {
          this.typeList = data.list;
          console.log('data==', data);
        })
        .catch((e) => {
          this.$message.error(e.message);
        });
    },

    // 返回上一页
    previousPage () {
      if (this.jjstatus == '1') {
        this.currentStepIndex = this.currentStepIndex - 1;
        if (this.currentStepIndex == 1) {
          this.currentStepIndex = 1;
        }
      } else {
        this.zfbCurrentStepIndex = this.zfbCurrentStepIndex - 1;
        if (this.zfbCurrentStepIndex == 1) {
          this.zfbCurrentStepIndex = 1;
        }
      }
    },
    // 查看详情页面
    async viewDetail (id, status) {
      console.log(id);
      const res = await selectByPrimaryKey({ id: id });

      const obj1 = res.data;
      console.log(status);

      // 如果rejectReason 有值那么我就弹框显示驳回原因 然后重新审核
      if (res.data.merchantsapplyfor.rejectReason !== null) {
        // 弹框显示原因
        this.incomingStatus = status;
        console.log(this.incomingStatus);
        // 驳回原因
        this.rejectReason = res.data.merchantsapplyfor.rejectReason;
        this.currentStepIndex = 3;

        this.drawer = true;
      } else {
        list[0] = obj1;
        console.log(list);

        this.jjstatus = 3;
        this.incomingStatus = ''
        this.drawer = true;
      }
    },
    // 打开微信进件
    async openWeInbound (index) {
      this.drawer = true;
      // oem查询代理列表 接口调用
      console.log(this.$store.state.user.info.oemId);

      const res = await oemQueryAgentList({
        limit: 10,
        oemType: 2,
        page: 1,
        parentId: this.$store.state.user.info.oemId
      });
      // 下属代理的数据
      console.log(res);

      if (res.code == 2000 && res.data.list.length) {
        const agentList = res.data.list.map((item) => {
          return {
            label: item.oemCode,
            value: item.id
          };
        });
        this.subordinateAgentList = agentList;
        console.log(this.subordinateAgentList);
      }

      this.jjstatus = index;
    },
    // 获取第在的code编码
    bankAddressCode () {
      if (this.wxSumbitForm.bankAddressCode) {
        const res =
          this.wxSumbitForm.bankAddressCode?.[
          this.wxSumbitForm.bankAddressCode.length - 1
          ];
        return res;
      }
    },

    bizAddressCode () {
      if (this.wxSumbitForm.bankAddressCode) {
        const res =
          this.wxSumbitForm.bizAddressCode?.[
          this.wxSumbitForm.bankAddressCode.length - 1
          ];
        return res;
      }
    },
    /* 表格数据源 */
    datasource ({ page, limit, where, order }) {
      //   console.log(where, order);

      // return oemList;
      return dsfmerenterinfoPage({
        page,
        limit,
        ...where,
        oemId: this.$store.state.user.info.oemId
      });
    },

    /* 刷新表格 */
    reload (where) {
      console.log('where', where);
      this.$refs.table.reload({ page: 1, limit: 10, where: where });
    },
    modifyRate (id) {
      this.current = null;
      console.log(id)
      this.id = id
      this.showEdit = true;
    },
    /* 打开划拨编辑弹窗 */
    openTransfer (row) {
      this.current = row;
      this.showTransfer = true;
    },
    /* 打开导入弹窗 */
    openImport () {
      this.showImport = true;
    },
    /* 删除 */
    remove (row) {
      const loading = this.$loading({ lock: true });
      removeUsers({ ids: [row.id] })
        .then((msg) => {
          loading.close();
          this.$message.success(msg);
          this.reload();
        })
        .catch((e) => {
          loading.close();
          this.$message.error(e.message);
        });
    },
    /*重置密码*/
    resets (row) {
      const loading = this.$loading({ lock: true });
      console.log('row', row);
      resetPassword({ id: row.id })
        .then((msg) => {
          loading.close();
          this.$message.success(msg);
          this.reload();
        })
        .catch((e) => {
          loading.close();
          this.$message.error(e.message);
        });
    },
    /* 批量删除 */
    removeBatch () {
      if (!this.selection.length) {
        this.$message.error('请至少选择一条数据');
        return;
      }
      this.$confirm('确定要删除选中的代理吗?', '提示', {
        type: 'warning'
      })
        .then(() => {
          const loading = this.$loading({ lock: true });
          removeUsers({ ids: this.selection.map((d) => d.id) })
            .then((msg) => {
              loading.close();
              this.$message.success(msg);
              this.reload();
            })
            .catch((e) => {
              loading.close();
              this.$message.error(e.message);
            });
        })
        .catch(() => { });
    },
    /* 更改状态 */
    editStatus (row) {
      const loading = this.$loading({ lock: true });
      updateUserStatus(row.id, row.status)
        .then((msg) => {
          console.log('msg=======', msg);
          loading.close();
          this.$message.success(
            row.status == 1 ? '启用成功！' : '冻结成功！'
          );
        })
        .catch((e) => {
          loading.close();
          row.status = !row.status ? 1 : 0;
          this.$message.error(e);
        });
    },

    // 切换 0 为 个人 1 为企业
    switchType (index) {
      if (this.jjstatus == '1') {
        this.wxSumbitForm.subjectType = index;
        if (index == 'SUBJECT_TYPE_INDIVIDUAL') {
          //   个人 719
          this.wxSumbitForm.settlementId = '746';
        } else {
          this.wxSumbitForm.settlementId = '711';
        }
      } else {
        this.zfbSumbitForm.merchantType = index;
        // 01：企业；cert_type填写201（营业执照）；cert_no填写营业执照号；
        // 06：个人商户：cert_type填写100（个人身份证）；cert_no填写个人身份证号码；
        // 07：个体工商户：cert_type填写201（营业执照）；cert_no填写营业执照编号；

        if (index == '01') {
          this.zfbSumbitForm.certType = this.certTypeList.businessLicense;
        } else if ('06') {
          this.zfbSumbitForm.certType = this.certTypeList.personalIDCard;
        } else if ('07') {
          this.zfbSumbitForm.certType = this.certTypeList.businessLicense;
        }
      }
      this.initRules();
    }
  }
};
</script>

<style lang="less" scoped>
.SigningReminder {
  display: flex;
  justify-content: center;
  align-items: center;
}
h6 {
  line-height: 1.5;
}
.loading-div {
  width: 100%;
  position: absolute;
}
.ele-modal {
  display: flex;
  justify-content: center;
  align-items: center;
}
/deep/.el-select {
  width: 100%;
}
/deep/.el-cascader--medium {
  width: 100%;
}
.el-row {
  padding: 30px;
  min-width: 500px;
}
.el-row-active {
  padding: 30px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

// 主体信息配置
.bg-purple {
  // h标签
  .hLabel {
    margin: 10px 0 20px;
    font-weight: 700;
    &::before {
      content: '';
      display: inline-block;
      vertical-align: top;

      margin-right: 5px;
      height: 23px;
      width: 6px;
      background-color: #1e6ceb;
    }
  }

  .subjectInformationLeft {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    .subjectInformationTitle {
      width: 792px;

      //   background-color: aqua;
      display: flex;
      align-items: center;
      justify-content: center;
      .title {
        margin-right: 46px;
        div {
          color: #666;
          margin: 5px 0 5px;
        }
      }
      .content {
        div {
          color: #000;
          margin: 5px 0 5px;
        }
        .view {
          color: #1e6ceb;
          cursor: pointer;
        }
      }
    }
    .subjectInformationContent {
      display: flex;
      align-items: center;
      justify-content: center;
      .title {
        margin-right: 46px;
        div {
          color: #666;
          margin: 5px 0 5px;
        }
      }
      .content {
        div {
          color: #000;
          margin: 5px 0 5px;
        }
        .view {
          color: #1e6ceb;
          cursor: pointer;
        }
      }
      width: 792px;

      //   background-color: aquamarine;
    }
  }
}

.zfb-purple {
  .zfbHLabel {
    margin: 10px 0 20px;
    font-weight: 700;
    &::before {
      content: url('../../../static/svg/zfbIcon.svg');
      display: inline-block;
      vertical-align: middle;

      margin-right: 5px;
    }
  }

  .ruleForm {
    /deep/ .el-upload--picture-card {
      line-height: 178px;
    }
    .fromSubmitOne {
      .hLabel {
        margin: 10px 0 20px;
        font-weight: 700;
        &::before {
          content: '';
          display: inline-block;
          vertical-align: top;

          margin-right: 5px;
          height: 23px;
          width: 6px;
          background-color: #1e6ceb;
        }
      }
      .subjectTypeSwitch {
        display: flex;
        height: 36px;
        line-height: 36px;
        justify-content: flex-start;
        border-radius: 3%;
        width: 160px;

        background-color: #fff;
        border: 1px solid #d9d9d9;
        text-align: center;
        .enterprise {
          //   overflow: hidden;
          background-color: #fff;
          width: 40%;
        }
        .individuality {
          color: #fff;
          background-color: #289aff;

          width: 60%;
        }
        .active-enterprise {
          width: 40%;
          color: #fff;
          background-color: #289aff;
        }
        .active-individuality {
          color: #606266;
          background-color: #fff;
          width: 60%;
        }
      }
      /deep/.el-form-item__label {
        color: #000;
      }
      /deep/.el-form-item {
        max-width: 737px;
        min-width: 245px;
      }

      span {
        color: #b4b4b4;
      }

      .entryTypeSwitch {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        border-radius: 3%;
        width: 160px;

        background-color: #fff;
        border: 1px solid #d9d9d9;
        text-align: center;
        .enterprise {
          //   overflow: hidden;
          background-color: #fff;
          width: 40%;
        }
        .individuality {
          color: #fff;
          background-color: #289aff;

          width: 60%;
        }
        .active-enterprise {
          width: 40%;
          color: #fff;
          background-color: #289aff;
        }
        .active-individuality {
          color: #606266;
          background-color: #fff;
          width: 60%;
        }
      }
    }
    .fromSubmitTwo {
      .hLabel {
        margin: 10px 0 20px;
        font-weight: 700;
        &::before {
          content: '';
          display: inline-block;
          vertical-align: top;

          margin-right: 5px;
          height: 23px;
          width: 6px;
          background-color: #1e6ceb;
        }
      }
      .subjectTypeSwitch {
        display: flex;
        height: 36px;
        line-height: 36px;
        justify-content: flex-start;
        border-radius: 3%;
        width: 160px;

        background-color: #fff;
        border: 1px solid #d9d9d9;
        text-align: center;
        .enterprise {
          //   overflow: hidden;
          background-color: #fff;
          width: 40%;
        }
        .individuality {
          color: #fff;
          background-color: #289aff;

          width: 60%;
        }
        .active-enterprise {
          width: 40%;
          color: #fff;
          background-color: #289aff;
        }
        .active-individuality {
          color: #606266;
          background-color: #fff;
          width: 60%;
        }
      }
      .ruleForm {
        /deep/.el-form-item__label {
          color: #000;
        }
        /deep/.el-form-item {
          max-width: 737px;
          min-width: 245px;
        }
        /deep/ .el-upload--picture-card {
          line-height: 178px;
        }
        span {
          color: #b4b4b4;
        }
        //正反面
        .positiveAndNegativeIDcards {
          display: flex;
          justify-content: flex-start;
          .positiveIDcards {
            //   margin-right: 50px;
            min-width: 200px;
          }
        }
      }
    }
    .drawer__footer {
      display: flex;
      justify-content: space-between;
    }
  }
}

.wx-purple {
  .wxHLabel {
    margin: 10px 0 20px;
    font-weight: 700;
    &::before {
      content: url('../../../static/svg/wxIcon.svg');
      display: inline-block;
      vertical-align: middle;

      margin-right: 5px;
    }
  }

  .ruleForm {
    .fromSubmitOne {
      .hLabel {
        margin: 10px 0 20px;
        font-weight: 700;
        &::before {
          content: '';
          display: inline-block;
          vertical-align: top;

          margin-right: 5px;
          height: 23px;
          width: 6px;
          background-color: #28c445;
        }
      }

      /deep/.el-range-editor--medium.el-input__inner {
        width: 600px !important;
      }
    }
    /deep/.el-form-item__label {
      color: #000;
    }
    /deep/.el-form-item {
      max-width: 737px;
      min-width: 245px;
    }
    /deep/ .el-upload--picture-card {
      line-height: 178px;
    }
    span {
      color: #b4b4b4;
    }

    .entryTypeSwitch {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      border-radius: 3%;
      width: 160px;

      background-color: #fff;
      border: 1px solid #d9d9d9;
      text-align: center;
      .enterprise {
        //   overflow: hidden;
        background-color: #fff;
        width: 40%;
      }
      .individuality {
        color: #fff;
        background-color: #28c445;

        width: 60%;
      }
      .active-enterprise {
        width: 40%;
        color: #fff;
        background-color: #28c445;
      }
      .active-individuality {
        color: #606266;
        background-color: #fff;
        width: 60%;
      }
    }
    .businessLicenseTime {
      display: flex;

      justify-content: flex-start;
      align-items: center;
    }

    .drawer__footer {
      display: flex;
      justify-content: space-between;
    }
  }
  .fromSubmitTwoWx {
    .hLabel {
      margin: 10px 0 20px;
      font-weight: 700;
      &::before {
        content: '';
        display: inline-block;
        vertical-align: top;

        margin-right: 5px;
        height: 23px;
        width: 6px;
        background-color: #28c445;
      }
    }
    .ruleForm {
      /deep/.el-form-item__label {
        color: #000;
      }
      /deep/.el-form-item {
        max-width: 737px;
        min-width: 245px;
      }
      /deep/ .el-upload--picture-card {
        line-height: 178px;
      }
      span {
        color: #b4b4b4;
      }
      //正反面
      .positiveAndNegativeIDcards {
        display: flex;
        justify-content: flex-start;
        .positiveIDcards {
          margin-right: 50px;
        }
      }
    }
    .drawer__footer {
      display: flex;
      justify-content: space-between;
    }
  }

  .fromSubmitThree {
    display: flex;
    flex-direction: column;
    align-items: center;
    .examine {
      color: #000;
      margin-bottom: 29px;
      font-size: 24px;
    }
    .closePage {
      width: 186px;
      height: 60px;
      border-radius: 43px;
      border: 1px solid #1e6ceb;
      color: #1e6ceb;
      margin-top: 57px;
    }
    .resubmit {
      color: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 186px;
      height: 60px;
      border-radius: 43px;
      background: #ff4d4f;
      box-shadow: 0px 4px 4px 0px #ff4d4f;
      margin-top: 57px;
    }
  }
}
.fromSubmitThree {
  display: flex;
  flex-direction: column;
  align-items: center;
  .examine {
    color: #000;
    margin-bottom: 29px;
    font-size: 24px;
  }
  .closePage {
    width: 186px;
    height: 60px;
    border-radius: 43px;
    border: 1px solid #1e6ceb;
    color: #1e6ceb;
    margin-top: 57px;
  }
  .resubmit {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 186px;
    height: 60px;
    border-radius: 43px;
    background: #ff4d4f;
    box-shadow: 0px 4px 4px 0px #ff4d4f;
    margin-top: 57px;
  }
}
</style>
